<?php

$router->group(['prefix' => 'inner'], function () use ($router) {
    // 动态
    $router->group(['prefix' => 'trends'], function () use ($router) {
        $router->get('set_type', ['uses' => 'TrendsController@setTrendsType']);
        $router->get('audit_switch', ['uses' => 'TrendsController@trendsAuditSwitch']);
        $router->get('audit', ['uses' => 'TrendsController@trendsAudit']);
    });

    // 动态话题
    $router->group(['prefix' => 'trends_topic'], function () use ($router) {
        $router->post('upsert', ['uses' => 'TrendsTopicController@updateOrInsertTrendsTopic']);
        $router->get('remove', ['uses' => 'TrendsTopicController@removeTrendsTopic']);
    });

    //动态
    $router->group(['prefix' => 'trends'], function () use ($router) {
        // 动态更新
        $router->get('update', ['uses' => 'TrendsController@trendsUpdate']);
        //动态评论删除
        $router->get('comment/del', ['uses' => 'TrendsController@commentDel']);
    });

    //系统配置
    $router->group(['prefix' => 'system'], function () use ($router) {
        // 后台调用
        $router->post('config/create', ['uses' => 'SystemController@configCreate']);
        $router->post('config/update', ['uses' => 'SystemController@configUpdate']);
        $router->get('config/remove', ['uses' => 'SystemController@configRemove']);
        $router->post('version/create', ['uses' => 'SystemController@versionCreate']);
        $router->post('version/update', ['uses' => 'SystemController@versionUpdate']);
        $router->get('version/remove', ['uses' => 'SystemController@versionRemove']);
        $router->get('put_file_url', ['uses' => 'SystemController@get_put_file_url']);


    });


    $router->group(['prefix' => 'room'], function () use ($router) {
        //英杰提供
        $router->get('update', ['uses' => 'RoomController@roomUpdate']);
        $router->get('cbd/create', ['uses' => 'RoomController@createRoomByCBD']);
        $router->post('set_name', ['uses' => 'RoomController@set_name']);
        $router->post('set_notice', ['uses' => 'RoomController@set_notice']);
        $router->post('set_desc', ['uses' => 'RoomController@set_desc']);
        $router->post('set_cert', ['uses' => 'RoomController@set_cert']);
        $router->post('set_image', ['uses' => 'RoomController@set_image']);
        $router->post('set_room_allow_type', ['uses' => 'RoomUserController@setRoomAllowType']);
        $router->post('get_room_allow_type', ['uses' => 'RoomUserController@getRoomAllowType']);
        $router->get('voice/check/get/config', ['uses' => 'RoomVoiceCheckController@getConfig']);
        $router->post('voice/check/set/config', ['uses' => 'RoomVoiceCheckController@setConfig']);
        $router->post('voice/check/log/edit', ['uses' => 'RoomVoiceCheckController@eidtVoiceCheckLogStatus']);

        $router->get('tag/create', ['uses' => 'RoomController@roomTagCreate']);
        $router->get('tag/update', ['uses' => 'RoomController@roomTagUpdate']);

        //cms接口
        $router->get('all/kill', ['uses' => 'RoomController@killAllRoom']);
        $router->post('kill', ['uses' => 'RoomController@killRoom']);

        // 后台调用
        $router->get('reco/create', ['uses' => 'RoomController@roomRecoCreate']);
        $router->get('reco/update', ['uses' => 'RoomController@roomRecoUpdate']);
        $router->get('reco/remove', ['uses' => 'RoomController@roomRecoRemove']);
        $router->get('recommend/replace', ['uses' => 'RoomController@roomRecommendReplace']);

        $router->get('report/update', ['uses' => 'RoomController@reportUpdate']);

        $router->get('image/examine', ['uses' => 'RoomController@roomImageExamine']);

        // 音频检测
        $router->post('voice/check/set/config', ['uses' => 'RoomVoiceCheckController@setConfig']);
        $router->get('voice/check/start/loop', ['uses' => 'RoomVoiceCheckController@loopStart']);
        $router->get('voice/check/stop/loop', ['uses' => 'RoomVoiceCheckController@loopStop']);
        $router->post('voice/check/callback', ['uses' => 'RoomVoiceCheckController@callBack']);
        $router->get('voice/check/get/config', ['uses' => 'RoomVoiceCheckController@getConfig']);
        $router->get('voice/check/high/get', ['uses' => 'RoomVoiceCheckController@getHighRooms']);
        $router->get('voice/check/high/add', ['uses' => 'RoomVoiceCheckController@addHighRoom']);
        $router->get('voice/check/high/del', ['uses' => 'RoomVoiceCheckController@delHighRoom']);

        //房间类型
        $router->post('/type/upsert', ['uses' => 'RoomController@updateOrInsertRoomType']);
        $router->post('/type/del', ['uses' => 'RoomController@delRoomType']);

    });

    //用户相关
    $router->group(['prefix' => 'user'], function () use ($router) {
        //屏蔽用户，屏蔽设备
        $router->post('forbid_user', ['uses' => 'UserController@set_forbid_user']);
        $router->post('remove_forbid_user', ['uses' => 'UserController@remove_forbid_user']);
        $router->get('forbid_list', ['uses' => 'UserController@get_forbid_list']);

        // cms 调用
        $router->post('clear_cache', ['uses' => 'UserController@clear_cache']);

        // 后台调用
        $router->post('block/create', ['uses' => 'UserController@blockCreate']);
        $router->post('block/update', ['uses' => 'UserController@blockUpdate']);
        $router->get('block/remove', ['uses' => 'UserController@blockRemove']);
        $router->get('edit/user_info', ['uses' => 'UserController@editUserInfo']);
        $router->post('edit_user', ['uses' => 'UserController@edit_user']);
        $router->post('set_liang', ['uses' => 'UserController@setLiang']);
        $router->post('set_super', ['uses' => 'UserController@setSuper']);
        $router->post('set_official', ['uses' => 'UserController@setOfficial']);
        $router->post('set_waiter', ['uses' => 'UserController@setWaiter']);
        $router->post('set_v', ['uses' => 'UserController@setV']);
        $router->post('set_uid', ['uses' => 'UserController@setUid']);
        $router->post('set_active_certify', ['uses' => 'UserController@cmsSetCertify']);
        $router->post('create_user_verity', ['uses' => 'UserVerifyController@createUserVerify']);
        $router->post('set_abnormal', ['uses' => 'UserController@setAbnormal']);
    });

    //friends
    $router->group(['prefix' => 'friends'], function () use ($router) {
        // 举报用戶更新
        $router->get('report/update', ['uses' => 'FriendsController@reportUpdate']);
    });

    //banner
    $router->group(['prefix' => 'ad'], function () use ($router) {
        $router->post('create', ['uses' => 'AdController@adCreate']);
        $router->post('update', ['uses' => 'AdController@adUpdate']);
        $router->get('remove', ['uses' => 'AdController@adRemove']);
    });

    //消息相关
    $router->group(['prefix' => 'msg'], function () use ($router) {
        $router->post('text', ['uses' => 'MsgController@sys_text_msg']);
        $router->get('keep_alive_chat', ['uses' => 'MsgController@keep_alive_chat_cron']);
        $router->post('all_warning_msg', ['uses' => 'MsgController@allWarningMsg']);
        $router->post('warning_msg', ['uses' => 'MsgController@warningMsg']);
        $router->post('simple_full_service_msg', ['uses' => 'MsgController@simpleFullServiceMsgNotify']);
        $router->post('send_full_screen', ['uses' => 'MsgController@sendFullScreen']);
    });

    //商品
    $router->group(['prefix' => 'mall'], function () use ($router) {
        // 赠送用户商品
        $router->post('goods/give_user', ['uses' => 'MallController@giveUserGoods']);

        // 后台调用
        $router->post('create', ['uses' => 'MallController@goodsCreate']);
        $router->post('update', ['uses' => 'MallController@goodsUpdate']);
        $router->get('remove', ['uses' => 'MallController@goodsRemove']);

        $router->post('sku_create', ['uses' => 'MallController@goodsSkuCreate']);
        $router->post('sku_update', ['uses' => 'MallController@goodsSkuUpdate']);
        $router->get('sku_remove', ['uses' => 'MallController@goodsSkuRemove']);
        $router->get('sku_set_default', ['uses' => 'MallController@goodsSkuSetDefault']);
        $router->post('back_send_goods', ['uses' => 'MallController@back_send_goods']);
    });


    $router->group(['prefix' => 'finance'], function () use ($router) {
        //cms接口
        $router->post('back/pay', ['uses' => 'FinanceController@set_diamond_balance']);
        $router->post('back/kk/minus', ['uses' => 'FinanceController@minusKkValue']);
        $router->post('back/kk/inc', ['uses' => 'FinanceController@incKkValue']);
        $router->post('back/diamond/inc', ['uses' => 'FinanceController@incDiamondValue']);
        $router->post('pay/agent', ['uses' => 'FinancePayController@agent']);
        $router->get('withdraw/dismiss', ['uses' => 'FinanceWithdrawController@dismiss']);
        // 后台调用
        $router->get('wallet/update', ['uses' => 'FinanceController@walletUpdate']);
        $router->post('withdraw/exception_user', ['uses' => 'FinanceWithdrawController@withdrawExceptionUser']);

        // 提现规则限制
        $router->post('withdraw/cash_number', ['uses' => 'FinanceWithdrawController@withdrawCashNumber']);
        $router->post('withdraw/bank_number', ['uses' => 'FinanceWithdrawController@withdrawBankNumber']);
        $router->post('withdraw/week', ['uses' => 'FinanceWithdrawController@withdrawWeek']);

        // // 支付宝白名单
        // $router->get('alipayh5white/get', ['uses' => 'FinancePayController@getAliPayH5WhiteArr']);
        // $router->get('alipayh5white/add', ['uses' => 'FinancePayController@addAliPayH5White']);
        // $router->get('alipayh5white/del', ['uses' => 'FinancePayController@delAliPayH5White']);
        // $router->get('alipayh5white/find', ['uses' => 'FinancePayController@findAliPayH5White']);

    });

    $router->get('account/loop', ['uses' => 'UserController@loopAccountCancel']);

    $router->group(['prefix' => 'counter'], function () use ($router) {
        $router->post('upsert', ['uses' => 'CounterController@updateOrInsertCounter']);
        $router->get('remove', ['uses' => 'CounterController@removeCounter']);

        $router->post('cate/upsert', ['uses' => 'CounterController@updateOrInsertCounterCate']);
        $router->get('cate/remove', ['uses' => 'CounterController@removeCounterCate']);

    });

    $router->group(['prefix' => 'content'], function () use ($router) {
        $router->post('check/audit', ['uses' => 'ContentCheckController@checkAudit']);
    });

});